package com.kongwg.exer;

public class GeometricTest {
	
	public static void main(String[] args) {
		GeometricTest test = new GeometricTest();
		test.displayGeometricObject(new Circle("red",10,1));
		test.equalsArea(new MyRectangle("red", 10, 2, 3), new MyRectangle("black", 10, 2, 2));
		
	}
	
	public void equalsArea(GeometricObject gob,GeometricObject gob1){
		if(gob.findArea()==gob1.findArea()){
			System.out.println("面积相等");
		}else{
			System.out.println("面积不相等");
		}
		
		
		
	}
	public void displayGeometricObject(GeometricObject gob){
		
		System.out.println("面积为："+gob.findArea());
	}
}
